package com.zhiwei.controller;

import com.zhiwei.service.WebService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
public class WebServiceController {

    @Resource
    private WebService webService;

    /**
     * 获取网页资源
     *
     * @param request
     * @param response
     * @return
     */
    @GetMapping(value = {"/", "/img/**", "/js/**", "/css/**", "/fonts/**", "/index.html", "/favicon.ico"})
    public void index(HttpServletRequest request, HttpServletResponse response) {
        webService.webFile(request, response);
    }
}
